home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-25 | 1.5 KB | 41 lines | [TEXT/GEOL] |
- Item 1581281 23-Aug-89 17:42
-
- From: MACDTS Macintosh Developer Tech. Supt.,APL
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: Re- disable invalid Paste
-
- To: Les Caudle, D2215
-
- Les,
-
- I think that what you suggest for filtering Paste commands is basically the way
- to go. I have just a few minor suggestions:
-
- When a MenuCommand needs to be handled by a TEditText object, it just passes it
- on to the TDialogTEView that TDialogView creates. TDialogTEView checks to make
- sure that there is enough room for a paste, and, if so, create a TPasteCommand.
-
- What I think you should do is subclass TDialogView that makes a
- TFilterDialogTEView, instead of a TDialogTEView. The TFilterDialogTEView would
- create a TTEFilterPasteCommand instead. This TTEFilterPasteCommand would then
- call TFilterableEditText(fEditText).FilterChars. As long as you make sure that
- all of your TEditText items support this call, you can skip the Member(x,y)
- test.
-
- Also, you may want to perform the filtering on TTEPasteCommand.InstallNewText,
- rather than TTEPasteCommand.ITEPasteCommand. Another thing you may want to do
- is include some facility for making sure that the Style record is adjusted
- accordingly if you chop out characters.
-
- On the other hand, you may just want to chuck all of this out the window and
- just let TNumberText.Validate handle all of this when the user finishes
- editting...
-
- Hope this helps,
-
- - Keith Rollin
- - Apple Developer Technical Support
-
-